/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package rom.mob;

import java.util.ArrayList;
import rom.drop.CardDrop;

/**
 *
 * @author Luis
 */
public class MobCardDrop {
    
    private ArrayList<CardDrop> drops = new ArrayList<>();
    
    public void addDrop(CardDrop drop) {
        if (!drops.contains(drop) && size() < 1) {
            drops.add(drop);
        }
    }
    
    public void removeDrop(CardDrop drop) {
        if (drops.contains(drop)) {
            drops.remove(drop);
        }
    }
    
    public CardDrop getDrop(int id) {
        for (CardDrop drop : drops) {
            if (drop.getId() == id) {
                return drop;
            }
        }
        return null;
    }
    
    public int size(){
        return drops.size();
    }
}
